As the development and the popularization of the internet, more and more users start to experience the internet. However, not all the environments and the resources of the internet could be secured. If a user terminal is infected by a virus, it may cause terminal system paralysis or hardware damage, even cause the user privacy information leakage to threaten the personal and property safety. Thus, the problem of internet security is increasingly concerned by people. A conventional method of anti-virus includes two parts which are static defense and dynamic defense, and these two parts are the cornerstones for confronting the spread of virus. The static defense therein is an even more fundamental technique in anti-virus process, and some basic functions of dynamic defense also need to be provided and strengthened by the static defense. Moreover, in the static defense, the performance of anti-virus engine is most important. There are several measuring indices for the performance of anti-virus engine, such as virus detection rate, virus killing rate, efficiency of anti-virus scanning, etc., while one of the critical measuring indices is the efficiency of anti-virus scanning. When performing an anti-virus scanning, the anti-virus engine needs to consider both of disk read/write operations and calculations. Therefore, in a conventional anti-virus engine, the disk read/write operation as a key factor for the efficiency of anti-virus scanning becomes the bottleneck of the conventional anti-virus engine performance.
In a conventional anti-virus method, by caching a to-be-scanned file into a memory and scanning the to-be-scanned file in the memory, the amount of disk read/write operations in a subsequent anti-virus scanning is reduced, and thus, the efficiency of anti-virus scanning is improved. Due to the limited capacity of a memory, this method usually caches only virus files into a memory, while for the huge amount of normal files on a user terminal, there is no definite method to instruct whether and which files need to be cached into the memory. Therefore, the conventional anti-virus method consumes such a long time, and the efficiency of anti-virus scanning is low.